<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: oemxlate.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00218_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">oemxlate.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00218.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a03620.html">precomp.h</a>&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#pragma hdrstop</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">// LATER IanJa: reverse logic - WideCharToMultiByte() termination problem</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="a00218.html#a1af588237588e016d907ec7d047d0432">   27</a></span>&#160;<span class="preprocessor">#define MAXOUTCCHW(pwszOut) (~(ULONG)(pwszOut+1) &gt;&gt; 2)</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="a00218.html#a2f76b58640928973f88636244b7a588e">   28</a></span>&#160;<span class="preprocessor">#define MAXOUTCCHA(pszOut) (~(ULONG)(pszOut+1) &gt;&gt; 2)</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="a00218.html#a7193d7b27b899a1624265e4ab67922e8">   38</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a7193d7b27b899a1624265e4ab67922e8">CharToOemA</a>(</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    LPCSTR pSrc,</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    LPSTR pDst)</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    }</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        *pDst++ = <a class="code" href="a00020.html#aeaf09b8f97511d8949a4be0cba1ae242">gpAnsiToOem</a>[(UCHAR)*pSrc];</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    } <span class="keywordflow">while</span> (*pSrc++);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="a00218.html#a76a43749b212335e70f22e0d156fc0a6">   62</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a76a43749b212335e70f22e0d156fc0a6">CharToOemBuffA</a>(</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    LPCSTR pSrc,</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    LPSTR pDst,</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> nLength)</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">while</span> (nLength--) {</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        *pDst++ = <a class="code" href="a00020.html#aeaf09b8f97511d8949a4be0cba1ae242">gpAnsiToOem</a>[(UCHAR)*pSrc++];</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="a00218.html#a374d0a01bf28b29f271ca68e37b45c1e">   90</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a374d0a01bf28b29f271ca68e37b45c1e">OemToCharA</a>(</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    LPCSTR pSrc,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    LPSTR pDst)</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;{</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        *pDst++ = <a class="code" href="a00020.html#a5864339ea37178dcb3da3b16415db902">gpOemToAnsi</a>[(UCHAR)*pSrc];</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    } <span class="keywordflow">while</span> (*pSrc++);</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="a00218.html#a76de1e727e63248f33a1098a250a1d1a">  117</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a76de1e727e63248f33a1098a250a1d1a">OemToCharBuffA</a>(</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    LPCSTR pSrc,</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    LPSTR pDst,</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> nLength)</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;{</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    }</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordflow">while</span> (nLength--) {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        *pDst++ = <a class="code" href="a00020.html#a5864339ea37178dcb3da3b16415db902">gpOemToAnsi</a>[(UCHAR)*pSrc++];</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    }</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;}</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="a00218.html#a5c3458571ccfd0c271b8c324c9b2de42">  143</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a5c3458571ccfd0c271b8c324c9b2de42">CharToOemW</a>(</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    LPCWSTR pSrc,</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    LPSTR pDst)</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;{</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pSrc == (LPCWSTR)pDst) {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="comment">         * WideCharToMultiByte() requires pSrc != pDst: fail this call.</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="comment">         * LATER: Is this really true?</span></div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    }</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <a class="code" href="a00941.html#aaf8b3ae5e2b40b6de6cc9377d53baa45">WideCharToMultiByte</a>(</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            CP_OEMCP,                         <span class="comment">// Unicode -&gt; OEM</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            0,                                <span class="comment">// gives best visual match</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            (LPWSTR)pSrc, -1,                 <span class="comment">// source &amp; length</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;            pDst, (<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>)<a class="code" href="a00218.html#a2f76b58640928973f88636244b7a588e">MAXOUTCCHA</a>(pDst),      <span class="comment">// dest &amp; max poss. length</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            <span class="stringliteral">&quot;_&quot;</span>,                              <span class="comment">// default char</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            NULL);                            <span class="comment">// (don&#39;t care whether defaulted)</span></div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;}</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="a00218.html#a93b71acf6d0896e97dbca339fe43be86">  177</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a93b71acf6d0896e97dbca339fe43be86">CharToOemBuffW</a>(</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    LPCWSTR pSrc,</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    LPSTR pDst,</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> nLength)</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;{</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pSrc == (LPCWSTR)pDst) {</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="comment">         * WideCharToMultiByte() requires pSrc != pDst: fail this call.</span></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="comment">         * LATER: Is this really true?</span></div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    }</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <a class="code" href="a00941.html#aaf8b3ae5e2b40b6de6cc9377d53baa45">WideCharToMultiByte</a>(</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            CP_OEMCP,                         <span class="comment">// Unicode -&gt; OEM</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;            0,                                <span class="comment">// gives best visual match</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            (LPWSTR)pSrc, (<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>)nLength,       <span class="comment">// source &amp; length</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;            pDst, <a class="code" href="a00218.html#a2f76b58640928973f88636244b7a588e">MAXOUTCCHA</a>(pDst),           <span class="comment">// dest &amp; max poss. length</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;            <span class="stringliteral">&quot;_&quot;</span>,                              <span class="comment">// default char</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;            NULL);                            <span class="comment">// (don&#39;t care whether defaulted)</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;}</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="a00218.html#a33f6ebdd3ae428f7af11271f3036628d">  211</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a33f6ebdd3ae428f7af11271f3036628d">OemToCharW</a>(</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    LPCSTR pSrc,</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    LPWSTR pDst)</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;{</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pSrc == (LPCSTR)pDst) {</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;<span class="comment">         * MultiByteToWideChar() requires pSrc != pDst: fail this call.</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;<span class="comment">         * LATER: Is this really true?</span></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    }</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; </div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="a00941.html#ab5fefa29de8bde48a74efa8d838bf2d7">MultiByteToWideChar</a>(</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            CP_OEMCP,                          <span class="comment">// Unicode -&gt; OEM</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            MB_PRECOMPOSED | MB_USEGLYPHCHARS, <span class="comment">// visual map to precomposed</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;            (LPSTR)pSrc, -1,                   <span class="comment">// source &amp; length</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            pDst,                              <span class="comment">// destination</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            <a class="code" href="a00218.html#a1af588237588e016d907ec7d047d0432">MAXOUTCCHW</a>(pDst));                 <span class="comment">// max poss. precomposed length</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;}</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="a00218.html#a0bd8824d121cd389a4242c1de7e7678b">  244</a></span>&#160;BOOL WINAPI <a class="code" href="a00218.html#a0bd8824d121cd389a4242c1de7e7678b">OemToCharBuffW</a>(</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    LPCSTR pSrc,</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    LPWSTR pDst,</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> nLength)</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;{</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <span class="keywordflow">if</span> (pSrc == NULL || pDst == NULL) {</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pSrc == (LPCSTR)pDst) {</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="comment">         * MultiByteToWideChar() requires pSrc != pDst: fail this call.</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;<span class="comment">         * LATER: Is this really true?</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    }</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    <a class="code" href="a00941.html#ab5fefa29de8bde48a74efa8d838bf2d7">MultiByteToWideChar</a>(</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            CP_OEMCP,                          <span class="comment">// Unicode -&gt; OEM</span></div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            MB_PRECOMPOSED | MB_USEGLYPHCHARS, <span class="comment">// visual map to precomposed</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;            (LPSTR)pSrc, nLength,              <span class="comment">// source &amp; length</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;            pDst,                              <span class="comment">// destination</span></div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;            <a class="code" href="a00218.html#a2f76b58640928973f88636244b7a588e">MAXOUTCCHA</a>(pDst));                 <span class="comment">// max poss. precomposed length</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;}</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160; </div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160; </div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="a00218.html#ac516235e27e35b7f44d44cc7f110f372">  279</a></span>&#160;<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> WINAPI <a class="code" href="a00218.html#ac516235e27e35b7f44d44cc7f110f372">OemKeyScan</a>(</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    WORD wOemChar)</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;{</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    WCHAR wchOem;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    SHORT sVk;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> dwRet;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160; </div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="a00218.html#a0bd8824d121cd389a4242c1de7e7678b">OemToCharBuffW</a>((LPCSTR)&amp;wOemChar, &amp;wchOem, 1)) {</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <span class="keywordflow">return</span> 0xFFFFFFFF;</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    }</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    sVk = VkKeyScanW(wchOem);</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordflow">if</span> ((dwRet = MapVirtualKeyW(LOBYTE(sVk), 0)) == 0) {</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        <span class="keywordflow">return</span> 0xFFFFFFFF;</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    }</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    <span class="keywordflow">return</span> dwRet | ((sVk &amp; 0xFF00) &lt;&lt; 8);</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa00218_html_a93b71acf6d0896e97dbca339fe43be86"><div class="ttname"><a href="a00218.html#a93b71acf6d0896e97dbca339fe43be86">CharToOemBuffW</a></div><div class="ttdeci">BOOL WINAPI CharToOemBuffW(LPCWSTR pSrc, LPSTR pDst, DWORD nLength)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00177">oemxlate.c:177</a></div></div>
<div class="ttc" id="aa00941_html_aaf8b3ae5e2b40b6de6cc9377d53baa45"><div class="ttname"><a href="a00941.html#aaf8b3ae5e2b40b6de6cc9377d53baa45">WideCharToMultiByte</a></div><div class="ttdeci">int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cchMultiByte, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar)</div></div>
<div class="ttc" id="aa00953_html_a392e62da233ed3e2f7c3fd4f487a3896"><div class="ttname"><a href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a></div><div class="ttdeci">int INT</div><div class="ttdef"><b>Definition:</b> <a href="a00953_source.html#l00006">bench.c:6</a></div></div>
<div class="ttc" id="aa00218_html_a0bd8824d121cd389a4242c1de7e7678b"><div class="ttname"><a href="a00218.html#a0bd8824d121cd389a4242c1de7e7678b">OemToCharBuffW</a></div><div class="ttdeci">BOOL WINAPI OemToCharBuffW(LPCSTR pSrc, LPWSTR pDst, DWORD nLength)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00244">oemxlate.c:244</a></div></div>
<div class="ttc" id="aa00020_html_aeaf09b8f97511d8949a4be0cba1ae242"><div class="ttname"><a href="a00020.html#aeaf09b8f97511d8949a4be0cba1ae242">gpAnsiToOem</a></div><div class="ttdeci">PCHAR gpAnsiToOem</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00106">clglobal.c:106</a></div></div>
<div class="ttc" id="aa00218_html_a76a43749b212335e70f22e0d156fc0a6"><div class="ttname"><a href="a00218.html#a76a43749b212335e70f22e0d156fc0a6">CharToOemBuffA</a></div><div class="ttdeci">BOOL WINAPI CharToOemBuffA(LPCSTR pSrc, LPSTR pDst, DWORD nLength)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00062">oemxlate.c:62</a></div></div>
<div class="ttc" id="aa00218_html_ac516235e27e35b7f44d44cc7f110f372"><div class="ttname"><a href="a00218.html#ac516235e27e35b7f44d44cc7f110f372">OemKeyScan</a></div><div class="ttdeci">DWORD WINAPI OemKeyScan(WORD wOemChar)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00279">oemxlate.c:279</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa00020_html_a5864339ea37178dcb3da3b16415db902"><div class="ttname"><a href="a00020.html#a5864339ea37178dcb3da3b16415db902">gpOemToAnsi</a></div><div class="ttdeci">PCHAR gpOemToAnsi</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00105">clglobal.c:105</a></div></div>
<div class="ttc" id="aa00218_html_a374d0a01bf28b29f271ca68e37b45c1e"><div class="ttname"><a href="a00218.html#a374d0a01bf28b29f271ca68e37b45c1e">OemToCharA</a></div><div class="ttdeci">BOOL WINAPI OemToCharA(LPCSTR pSrc, LPSTR pDst)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00090">oemxlate.c:90</a></div></div>
<div class="ttc" id="aa00941_html_ab5fefa29de8bde48a74efa8d838bf2d7"><div class="ttname"><a href="a00941.html#ab5fefa29de8bde48a74efa8d838bf2d7">MultiByteToWideChar</a></div><div class="ttdeci">int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cchMultiByte, LPWSTR lpWideCharStr, int cchWideChar)</div></div>
<div class="ttc" id="aa00218_html_a5c3458571ccfd0c271b8c324c9b2de42"><div class="ttname"><a href="a00218.html#a5c3458571ccfd0c271b8c324c9b2de42">CharToOemW</a></div><div class="ttdeci">BOOL WINAPI CharToOemW(LPCWSTR pSrc, LPSTR pDst)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00143">oemxlate.c:143</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa03620_html"><div class="ttname"><a href="a03620.html">precomp.h</a></div></div>
<div class="ttc" id="aa00218_html_a33f6ebdd3ae428f7af11271f3036628d"><div class="ttname"><a href="a00218.html#a33f6ebdd3ae428f7af11271f3036628d">OemToCharW</a></div><div class="ttdeci">BOOL WINAPI OemToCharW(LPCSTR pSrc, LPWSTR pDst)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00211">oemxlate.c:211</a></div></div>
<div class="ttc" id="aa00218_html_a7193d7b27b899a1624265e4ab67922e8"><div class="ttname"><a href="a00218.html#a7193d7b27b899a1624265e4ab67922e8">CharToOemA</a></div><div class="ttdeci">BOOL WINAPI CharToOemA(LPCSTR pSrc, LPSTR pDst)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00038">oemxlate.c:38</a></div></div>
<div class="ttc" id="aa00218_html_a1af588237588e016d907ec7d047d0432"><div class="ttname"><a href="a00218.html#a1af588237588e016d907ec7d047d0432">MAXOUTCCHW</a></div><div class="ttdeci">#define MAXOUTCCHW(pwszOut)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00027">oemxlate.c:27</a></div></div>
<div class="ttc" id="aa00218_html_a76de1e727e63248f33a1098a250a1d1a"><div class="ttname"><a href="a00218.html#a76de1e727e63248f33a1098a250a1d1a">OemToCharBuffA</a></div><div class="ttdeci">BOOL WINAPI OemToCharBuffA(LPCSTR pSrc, LPSTR pDst, DWORD nLength)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00117">oemxlate.c:117</a></div></div>
<div class="ttc" id="aa00218_html_a2f76b58640928973f88636244b7a588e"><div class="ttname"><a href="a00218.html#a2f76b58640928973f88636244b7a588e">MAXOUTCCHA</a></div><div class="ttdeci">#define MAXOUTCCHA(pszOut)</div><div class="ttdef"><b>Definition:</b> <a href="a00218_source.html#l00028">oemxlate.c:28</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_caf01b281dbc7d7ffe410ecf117b6142.html">client</a></li><li class="navelem"><a class="el" href="a00218.html">oemxlate.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
